package cn.edu.scau.cmi.mengzhuorong.simpleFactoryMethod;

import cn.edu.scau.cmi.mengzhuorong.simpleFactoryMethod.domain.Meat;
import cn.edu.scau.cmi.mengzhuorong.simpleFactoryMethod.domain.Pork;
import cn.edu.scau.cmi.mengzhuorong.simpleFactoryMethod.domain.Beef;
import cn.edu.scau.cmi.mengzhuorong.simpleFactoryMethod.domain.Chicken;

public class MeatFactory {

	public static Meat getMeat(String MeatType) {
		Meat meat = null;
		switch(MeatType) {
		case "Pork":
			meat = new Pork(); break;
		case "Beef":
			meat = new Beef(); break;
		case "Chicken":
			meat = new Chicken(); break;
		}
		return meat;
	}
}
